<?php
/**
* Config for Olark Chat Widget module
* 
* @version 1.0
* @author trungdt
* @since Oct 26, 2011
*/

class basicsocialmodule_config {
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->twitter_id = "";
            $object->facebook_id = "";
			
		} else {
			
			$form->meta('id',$object->id);
		}

		$form->register('twitter_id','Twitter ID',new textcontrol($object->twitter_id,50,false,100,"",true));
        $form->register('facebook_id','Facebook ID',new textcontrol($object->facebook_id,50,false,100,"",true));
				
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->twitter_id = _ab_safe_html_string($values['twitter_id']);
        $object->facebook_id = _ab_safe_html_string($values['facebook_id']);
		return $object;
	}
}

?>